package com.macro.mall.tiny.modules.pms.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 激活码表
 * </p>
 *
 * @author tyrone
 * @since 2025-03-02
 */
@Getter
@Setter
@TableName("pms_activation_code")
@ApiModel(value = "PmsActivationCode对象", description = "激活码表")
public class PmsActivationCode implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("激活码id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("激活码")
    private String code;

    @ApiModelProperty("过期时间")
    private Integer duration;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("激活时间")
    private Date activationTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("创建时间")
    private Date createTime;

    @ApiModelProperty("状态 0待使用 1已使用 2无效")
    private Integer status;

    @ApiModelProperty("分页参数")
    @TableField(exist = false)
    private Integer pageSize = 1;

    @ApiModelProperty("分页参数")
    @TableField(exist = false)
    private Integer pageNum = 10;

    @ApiModelProperty("激活时间起")
    @TableField(exist = false)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date activationTimeStart;

    @ApiModelProperty("激活时间止")
    @TableField(exist = false)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date activationTimeEnd;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("createTime起")
    @TableField(exist = false)
    private Date createTimeStart;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("createTime止")
    @TableField(exist = false)
    private Date createTimeEnd;
}
